package com.jie.eclipse.pan.preferences;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;

import com.jie.eclipse.pan.Activator;

/**
 * Class used to initialize default preference values.
 */
public class PreferenceInitializer extends AbstractPreferenceInitializer {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
	 */
	public void initializeDefaultPreferences() {
		IPreferenceStore store = Activator.getDefault().getPreferenceStore();

		store.setDefault(PreferenceConstants.P_NAME, System.getProperty("user.name"));
		store.setDefault(PreferenceConstants.P_CUSTOM_NAME, System.getProperty("user.name"));
		store.setDefault(PreferenceConstants.P_COMMON_COLUMN, "prgName,crtDay,crtName,crtIp,crtHr006tsn,updDay,updName,updIp,updHr006tsn");
		
		store.setDefault(PreferenceConstants.P_DEFAULT_DATASOURCE, "info5");
		store.setDefault(PreferenceConstants.P_DEFAULT_SQL, "select * from ");
		
		store.setDefault(PreferenceConstants.P_PAN_DEFAULT_DATASOURCE, "info5");
		
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_NAME1, "info");
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_IP1, "169.169.0.12");
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_PWD1, "");
		
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_NAME2, "info5");
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_IP2, "169.169.0.6");
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_PWD2, "201008");
		
		
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_NAME3, "info6");
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_IP3, "169.169.0.17");
		store.setDefault(PreferenceConstants.P_PAN_DATASOURCE_PWD3, "");
	}

}
